package com.ss.s5_Method;

/**
 * @Auther: 520ljs
 * @Date: 2022/3/13 - 03 - 13 - 16:27
 */
public class TestMethod04 {
    public static void main(String[] args) {
        int a = 10;
        int b = 20;
        System.out.println("输出交换前的两个数：" + a + "---" + b);
        changeNum(a, b);
        System.out.println("输出交换后的两个数：" + a + "---" + b);

        String s = changeNum2(a, b);
        System.out.println(s);
    }

    public static void changeNum(int num1, int num2) {
        int t;
        t = num1;
        num1 = num2;
        num2 = t;
    }

    public static String changeNum2(int num1, int num2) {
        int temp = num1;
        num1 = num2;
        num2 = temp;
        return "num1 = :" + num1 + "  num2 = " + num2;
    }
}
